{% extends 'home.html' %}


{% block content %}
    <h3 class="text-center">编辑还款</h3>
    <form action="" method="post">
        {% csrf_token %}
        <p>借款人:<input type="text" name="name" class="form-control" value="{{ edit_obj.name }}"></p>
        <p>还款总金额:<input type="text" name="add_money" class="form-control" value="{{ edit_obj.add_money }}" disabled="disabled"></p>
        <p>赊账总金额:<input type="text" name="sum_money" class="form-control" value="{{ edit_obj.sum_money }}" disabled="disabled" hidden="hidden"></p>
        <p>本次还款金额:<input type="text" name="money" class="form-control" value=""></p>
        <p>地址:<input type="text" name="path" class="form-control" value="{{ edit_obj.path }}"></p>
        <p>电话:<input type="text" name="telephone" class="form-control" value="{{ edit_obj.telephone }}"></p>
        <p>备注:<input type="text" name="ps" class="form-control" value="{{ edit_obj.ps }}"></p>
            <select name="name1" id="" class="form-control">
                {% for name1 in money_list %}
                    {#                    当前编辑对象的出版社信息与网站所有的出版社进行比对 如果对上了 就加selected#}
                    {% if edit_obj.name == name1 %}
                        <option value="{{ name1.name }}" selected>{{ name1.name }}</option>
                    {% else %}
                        <option value="{{ name1.pk }}">{{ name1.name }}</option>
                    {% endif %}

                {% endfor %}
            </select>
        <input type="submit" class="btn btn-danger pull-right">
    </form>

{% endblock %}